home *** CD-ROM | disk | FTP | other *** search
- <%@ page import="java.net.*,java.io.*" %>
-
- <%@include file="header.htm" %>
-
- <%
- String cgiPath = "/cgi-bin/sessearch.cgi";
- String scrName = request.getRequestURI();
- String query = request.getQueryString();
- if (query != null && query.length () > 0)
- {
- URL url;
- String address = cgiPath + "?" + query + "&wrap=" + scrName;
- try
- {
- url = new URL (address);
- }
- catch (MalformedURLException e)
- {
- String fullURL = request.getRequestURL ().toString ();
- URL thisURL = new URL (fullURL);
- url = new URL (thisURL.getProtocol (), thisURL.getHost (), thisURL.getPort (), address);
- }
-
- URLConnection connection = url.openConnection();
- InputStream stream = connection.getInputStream();
- BufferedInputStream in = new BufferedInputStream(stream);
- int i;
- while ((i = in.read()) != -1)
- {
- out.write(i);
- }
- out.flush();
- }
-
- %>
-
- <%@include file="footer.htm" %>
-